﻿namespace BootstrapBlazor.Components;

/// <summary>
/// 保存 <see cref="Navbar"/> 组件当前状态的信息
/// </summary>
public record NavbarState: NavbarBase
{
    /// <summary>
    /// 获得/设置 所属 <see cref="Navbar"/> 组件折叠模式
    /// </summary>
    internal NavbarCollapseMode CollapseMode { get; init; } = NavbarCollapseMode.Hide;

    /// <summary>
    /// 获得/设置 所属 <see cref="Navbar"/> 组件水平显示时折叠显示的临界断点
    /// </summary>
    internal BreakPoint BrokenPoint { get; init; } = BreakPoint.Small;

    /// <summary>
    /// 获得/设置 当前布局断点
    /// </summary>
    internal BreakPoint CurrentPoint { get; set; } = BreakPoint.None;

    /// <summary>
    /// 获得 当前 <see cref="Navbar"/> 组件是否超出临界断点
    /// </summary>
    internal bool IsBroken => BrokenPoint >= CurrentPoint;
}
